package com.etc.demo.controller;

import com.etc.demo.entity.Mail;
import com.etc.demo.service.ProduceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {
    @Autowired
    private ProduceService testService;
    @PostMapping("send")
    public boolean sendMail(@RequestBody Mail mail) {
        return testService.send(mail);
    }
}